<template>
  <div class="hello">
   <van-button type="default">默认按钮</van-button>
  <van-button type="primary">主要按钮</van-button>
  <van-button type="info">信息按钮</van-button>
  <van-button type="warning">警告按钮</van-button>
  <van-button type="danger">危险按钮</van-button>
  <div>{{count}}</div>
  </div>
</template>

<script>
import api from './../request/api';

export default {
  name: 'HelloWorld',
  props: {
    msg: String
  },
  data(){
    return {count: 0}
  },
  methods: {
    increment () {
      this.count++
    }
  },
   created: function () {
    // axios({
    //   url:api.test,
    //   methods:'get'
    // }).then(data=>{
    //     alert(JSON.stringify(data));
    // }).catch(error=>{
    //     alert(JSON.stringify(error));
    // });
    this.$get(api.test,{}).then(data=>{
      alert(JSON.stringify(data));
    }).catch(error=>{
      alert(JSON.stringify(error));
    })
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
